﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GeneratorObj : MonoBehaviour
{
    [SerializeField]
    private GameObject PreOb;
    public float objDisx=4;
    public float objDisY = 13;

    public int countX=40;
    public int countY = 10;
    private void Awake()
    {
        for (int i = 0; i < countX; i++)
        {
            for (int j = 0; j < countY; j++)
            {
                GameObject go = Instantiate(PreOb);
                go.transform.position =this.transform.position+ new Vector3(i * objDisx, 0,j * objDisY);
            }
        }
    }
}
